Relational database systems store tables of data which are typically linked together by relationships that simplify the storage of data and make queries of the data more efficient. Structured Query Language (SQL) is a standardized language for creating and operating on relational databases.
Relational database systems typically include an optimizer that plans the execution of SQL queries.
Many commercial database products, including Teradata™, offer workload management features that can reject (or delay) SQL queries based on an estimated impact on system performance of the query. Database administrators can define rules and criteria that identify resource expensive or inefficient queries that can be applied prior to query execution. Such rules are often defined as limits on the type of operations that can be performed, given the queries estimated resource usage. One example is the use of rules that identify and control the execution of “product joins”, which by their very nature can be resource intensive if there is a large number of rows to be joined. To control product joins, database administrators will typically impose a limit on the estimated number of input rows or the estimated number of results in output rows. Queries with product join operations that exceed a defined criteria are either rejected entirely or delayed for execution at a less critical time.
A major limitation of workload management rules is that they are normally enforced prior to query execution and hence must rely exclusively on estimated sizes and costs from the query optimizer. In many cases, these estimates can be inaccurate, which in turn, can result in a defined rule not being properly enforced. In the specific case of product joins, such mistakes can result in the execution of a query that negatively impacts on overall system performance and other users of the system. Conversely, such mistakes can result in the rejection or the delaying of an efficient query whose execution would not have a significant negative impact on the system.